python get utc time

43

python - oordinated universal time -

from datetime import datetime, timezone
print(datetime.now())              # timezone
print(datetime.now(timezone.utc))  # coordinated universal time 

Comments

Submit
0 Comments